import request from '/@/utils/request'

export const getDeviceUse = () => {
  return request({
    url: '/users',
    method: 'get',
  })
}

export const getCardInfo = () => {
  return request({
    url: '/cardInfo',
    method: 'get',
  })
}

// 查询用电趋势
export const getPowerTrend = (data: any) => {
  return request({
    url: '/powerTrend',
    method: 'post',
    data,
  })
}

// 获取用户设备
export const getUserDevice = (data: any) => {
  return request({
    url: '/userDevices',
    method: 'post',
    data,
  })
}

// 获取设备功率曲线数据
export const getDevicePowerCurve = (data: any) => {
  return request({
    url: '/devicePowerdetail',
    method: 'post',
    data,
  })
}

// 查询用户获取用电分布数据
export const getDevicePowerDetail = (data: any) => {
  return request({
    url: '/powerDistribution',
    method: 'post',
    data,
  })
}

// 用户获取设备启停时间轴数据

export const getDevicePowerTimeAxis = (data: any) => {
  return request({
    url: '/deviceTimeline',
    method: 'post',
    data,
  })
}
